package com.hifar.common;

import java.util.Objects;

public class SearchCondition {

	private String columnName;
	private String operate;
	private Object searchValue;

	public SearchCondition(String columnName, String operate, Object searchValue) {
		super();
		this.columnName = columnName;
		this.operate = operate;
		this.searchValue = searchValue;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public String getOperate() {
		return operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public Object getSearchValue() {
		return searchValue;
	}

	public void setSearchValue(Object searchValue) {
		this.searchValue = searchValue;
	}

	@Override
	public int hashCode() {
		return Objects.hash(columnName, operate, searchValue);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SearchCondition other = (SearchCondition) obj;
		return Objects.equals(columnName, other.columnName) && Objects.equals(operate, other.operate)
				&& Objects.equals(searchValue, other.searchValue);
	}

	@Override
	public String toString() {
		return "SearchCondition [columnName=" + columnName + ", operate=" + operate + ", searchValue=" + searchValue
				+ "]";
	}

}
